<UserControl x:Class="ClientUI.ViewModel.TrackerView"
             xmlns:CustomConverter="clr-namespace:Client.Converters;assembly=Client" 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             Width="900"
             Height="610">

    <UserControl.Resources>
        <CustomConverter:DateConverter x:Key="DateConverter" />
    </UserControl.Resources>

    <Grid>
        <StackPanel>
            <Border CornerRadius="15" Background="#202020" BorderThickness="0" Height="610" Width="900" >
                <StackPanel Orientation="Vertical" VerticalAlignment="Top" Margin="0,0,0,0">
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
                        <TextBlock Text="Status :" Style="{StaticResource ListTitleTextBlockStyle}" Margin="15,10,0,0" />
                        <TextBlock x:Name="Message" Text="Ready" Style="{StaticResource ListTitleTextBlockStyle}" Margin="15,10,0,0" />
                    </StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0" Width="870" Background="White">
                        <TextBlock Text="Barcode" Width="80" Style="{StaticResource ListHeaderTextBlockStyle}" />
                        <TextBlock Text="Title" Width="660" Style="{StaticResource ListHeaderTextBlockStyle}" />
                        <TextBlock Text="Time Track" Width="100" Style="{StaticResource ListHeaderTextBlockStyle}" />
                    </StackPanel>
                    <ListBox x:Name="TrnsList" Background="Transparent" Height="530" Width="870" BorderThickness="0" >
                        <ListBox.ItemContainerStyle>
                            <Style TargetType="{x:Type ListBoxItem}">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="ListBoxItem">
                                            <Grid Background="{TemplateBinding Background}">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal"/>
                                                        <VisualState x:Name="MouseOver"/>
                                                        <VisualState x:Name="Disabled"/>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="SelectionStates">
                                                        <VisualState x:Name="Unselected"/>
                                                        <VisualState x:Name="Selected"/>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused"/>
                                                        <VisualState x:Name="Unfocused"/>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </ListBox.ItemContainerStyle>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Width="840" Focusable="False">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="10" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="80" />
                                        <ColumnDefinition Width="660" />
                                        <ColumnDefinition Width="100" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding ItemCode}" Grid.Row="0" Grid.Column="0" Style="{StaticResource ListItemTextBlockStyle}" />
                                    <TextBlock Text="{Binding ItemTitle}" Grid.Row="0" Grid.Column="1" Style="{StaticResource ListItemTextBlockStyle}" />
                                    <TextBlock Text="{Binding CreatedOn}" Grid.Row="0" Grid.Column="2" Style="{StaticResource ListItemTextBlockStyle}" />
                                    <TextBlock Text="{Binding Message}" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource ListItemTextBlockStyle}" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </StackPanel>
            </Border>
        </StackPanel>
    </Grid>
</UserControl>
